package com.tjmc.company.mapper;


import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tjmc.company.api.entity.JobInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface JobInfoMapper extends BaseMapper<JobInfoEntity> {
    /**
     * 查询职位列表-依次按推广时间、置顶时间、修改时间排序
     * @param page
     * @return
     */
    Page<JobInfoEntity> getJobPage(Page page);

    /**
     * 查询置顶职位列表
     * @param page
     * @param companyId
     * @return
     */
    Page<JobInfoEntity> selectTopJobPage(Page page, Long companyId);

    Integer countJobCheckNum(String jobId);
    Integer countJobCollectNum(String jobId);
    Integer countJobDeliveryNum(String jobId);
    Integer countJobInviteNum(String jobId);
    Integer countMatchResumeNum(String jobId);

    Page<JobInfoEntity> getCompanyJobPage(Page page, @Param(Constants.WRAPPER) Wrapper<JobInfoEntity> ew);
}
